package com.duomn.mybatis.sample.action;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;

import com.duomn.mybatis.sample.entity.Sample;
import com.duomn.mybatis.sample.service.ISampleService;

@Controller
@RequestMapping("/sample")
public class SampleAction {
	
	@Autowired
	private ISampleService sampleService;
	
	@RequestMapping("/getSampleList")
	public String getSampleList(ModelMap model) {
		List<Sample> list = sampleService.listSample();
		model.put("list", list);
		return "sample/sample-list";
	}

}
